package hnlg.com.cn.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import hnlg.com.cn.mapper.HouseMapper;
import hnlg.com.cn.service.HouseService;
import hnlg.com.cn.vo.House;
@Service("houseService")
@Transactional(value="txManager",rollbackFor=Exception.class)
public class HouseServiceImpl implements HouseService {

	@Autowired
	HouseMapper houseMapper;
	@Override
	public boolean addHouse(House house) throws Exception {
		
		return houseMapper.addHouse(house);
	}

	@Override
	public boolean deleteHouse(int id) throws Exception {
		
		return houseMapper.deleteHouse(id);
	}

	@Override
	public boolean updateHouse(House house) throws Exception {
		
		return houseMapper.updateHouse(house);
	}

	@Override
	@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	public List<House> queryHouse(House house) throws Exception {
		
		return houseMapper.queryHouse(house);
	}

	@Override
	public boolean deleteBatch(String[] arr) throws Exception {
		
		return houseMapper.deleteBatch(arr);
	}

}
